package com.tangyuan.video.controller;

import com.tangyuan.common.result.Result;
import com.tangyuan.model.VideoCategoryHaokan;
import com.tangyuan.video.service.IVideoCategoryHaoKanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/video")
public class VideoCategoryController {

    @Autowired
    IVideoCategoryHaoKanService videoCategoryHaoKanService;


    @GetMapping("/getVideoCategory")
    public Result<List<VideoCategoryHaokan>> getVideoCategory() {
        return Result.ok(videoCategoryHaoKanService.getAllVideoCategoryHaoKan());
    }
}
